<script setup lang="ts">
import { useChartAction } from './hooks/action';
import { PropType } from "vue";
type BackTypeType = 'macarons' | 'dark'

const props = defineProps({
  className: {
    type: String,
    default: 'chart'
  },
  width: {
    type: String,
    default: '100%'
  },
  height: {
    type: String,
    default: '560px'
  },
  chartOption: {
    type: Object,
    default: null,
  },
  backType: {
    type: String as PropType<BackTypeType> ,
    default: 'macarons',
  }
});

const { chartRef, chart, } = useChartAction(props);

</script>

<template>
  <div ref="chartRef" :class="className" :style="{ height:height, width:width }" />
</template>

<style scoped lang="scss">

</style>